package com.hzncc.flowable_diboot.custom_field.mapper;

import com.diboot.core.mapper.BaseCrudMapper;
import com.hzncc.flowable_diboot.custom_field.entity.CustomFieldValue;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
* 自定义字段值 相关Mapper层接口定义
* @author MyName
* @version 1.0
* @date 2024-10-09
* Copyright © MyCorp
*/
@Mapper
public interface CustomFieldValueMapper extends BaseCrudMapper<CustomFieldValue> {

    /**
     * 获取自定义字段值
     * @param entityId
     * @return
     */
    @Select("select v.value,f.field_name as fieldName,f.data_type as dateType from mdl_custom_field_value v, mdl_custom_field f where v.entity_id = #{entityId} and v.field_id = f.id")
    List<Map<String, Object>> getCustomFieldValue(String entityId);
}